package cn.edu.cqvie.atc.chain;

/**
 * 链节点、相当于车厢🚗
 * @author Zheng Shaohong
 */
public class Node<T> {

    //数据域
    public T data;

    //指针域后一个节点
    public Node<T> next;

    //指针域前一个节点
    public Node<T> previous;

    public Node(T value) {
        this.data = value;
    }

    public void display() {
        System.out.print(data + " ");
    }
}
